/*
 * pirateAcorn.h -- include file for pirateAcorn
 *		 -- mostly just used for IOCTL Defintions
 *
 * Copyright (C) 2008 Matt Weir
 *
 * The source code in this file can be freely used, adapted,
 * and redistributed in source or binary form, so long as an
 * acknowledgment appears in derived source files.
 *
 * Original code from
 * "Linux Device Drivers" by Alessandro Rubini and Jonathan Corbet, published
 * by O'Reilly & Associates.
 */

#ifndef _PIRATEACORN_H_
#define _PIRATEACORN_H_

#include <linux/ioctl.h> /* needed for the _IOW etc stuff used later */

/*
 * Macros to help debugging
 */

#ifndef PIRATEACORN_MAJOR
#define PIRATEACORN_MAJOR 0   /* dynamic major by default */
#endif

/*
 * Ioctl definitions
 */

/* Use '>' as magic number */
#define PA_IOC_MAGIC  '>'
#define PA_IOC_MAXNR 8
#define PA_IOCREADSTART		_IO(PA_IOC_MAGIC, 0)
#define PA_IOCREADSTOP  	_IO(PA_IOC_MAGIC, 1)
#define PA_IOCWRITESTART 	_IO(PA_IOC_MAGIC, 2)
#define PA_IOCWRITESTOP  	_IO(PA_IOC_MAGIC, 3)
#define PA_IOCLOGGER    	_IOW(PA_IOC_MAGIC, 4, int)
#define PA_IOCNOLOGGER  	_IO(PA_IOC_MAGIC, 5)
#define PA_IOCLOGALL    	_IO(PA_IOC_MAGIC, 6)
#define PA_IOCLOGPID    	_IOW(PA_IOC_MAGIC, 7, int)

#endif /* _PIRATEACORN_H_ */
